1. Field of the Invention
The present invention relates to a technology for processing image data. More particularly, the present invention relates to a method for effectively and rapidly filtering noise generated when obtaining and coding image data.
2. Description of the Prior Art
At present, when high compression of image data is performed by means of image data coding, preprocessing and post-processing the image data is believed to be important.
Several schemes have been proposed to filter noise generated when obtaining and coding image data, such as median filter, MTM (modified trimmed mean) filter, FMH (FIR-median hybrid) filter, edge preserving smoothing filter, etc.
The median filter is a nonlinear recovering technology, which is designed to filter impulse type noises from the image, while preserving the edge. Usually the two-dimensional median filter uses a 3×3 or 5×5 rectangular mask to enclose the pixel to be filtered. For the median filtering method, the gray level of each pixel is replaced by the median of the gray levels in a neighborhood of that pixel, instead of by average. The median of a set of values is such that half the values in the set are less than m and half are greater than m. In order to perform median filtering in a neighborhood of a pixel, the values of the pixel and its neighbors are sorted to determine the median, and assign this value to the pixel.
MTM filters are a combination of the median filter and mean value filter. Consequently, they can overcome the disadvantage of the median filter and improving the noise suppressing effect. In the processing, the median is first derived. The mean value filter is then applied on the pixel having a value near it as the object, and the result is output. A topic to be solved is how to set the object range of the mean value filter in consideration of the characteristics of the image. Also, it has been pointed out that, compared with the conventional median filter, the edge portion becomes more blurred.
Just as MTM filters, FMH filters are also a combination of the median filter and the mean value filter. However, FMH filters differ from MTM filters in that a mean value filter is applied first. Also, the mask for the mean value filter has a directionality with quantization in 90° or 450°. Compared with MTM filters, they can suppress blurriness of the edge portion, and the amount of computation required can be reduced significantly.
The edge preserving smoothing filter is a type of selective smoothing filter. It performs adaptive switching of the mask according to the localized properties of the region. Several types of polygonal masks are initially defined. Then, the degree of the variation in the pixel value in the region corresponding to each mask is calculated. Then, among the masks, the mask with the smallest degree of variation of the pixel value is selected, and the mean value of the pixel value in the region corresponding to this mask is output. In this case, the noise can be suppressed while the edge is preserved. However, it has been pointed out that the fine texture is lost, which is a disadvantage.
The above conventional technologies utilize the mean value of the pixel values in the region corresponding to a mask the target pixel centered as the output of the target pixel. One of the known method for obtaining the mean value includes selecting eight neighboring pixels x, y, z, a, c, d, e, f around a target pixel b, i.e. the pixel to be filtered, and calculating an absolute value of a difference between the target pixel and each of the eight neighboring pixels. When the absolute value of the difference between the target pixel and one of the eight neighboring pixels is larger than a standard deviation, the neighboring pixel is abandoned, not putted in the mean value filtering computation. When the absolute value of the difference between the target pixel and one of the eight neighboring pixels is not larger than a standard deviation, the neighboring pixel is putted in the mean value filtering computation. Hence, there are several cases such as b′=average(xyzabcdef), b′=average(xyzb) and b′=average(bcdef) etc. to obtain the mean value of the target pixel value and the pixel values in the neighborhood thereof. In performing the noise filtering computation, it is possible to use 9, 8, 7 . . . etc. as the divisor. For example, when b′=average(xyzabcdef) is used to obtain the mean value of the pixel values, the divisor of each of the pixel values putted in the noise filtering computation is 9. The noise filtering computation would be complicated whether implemented using hardware, software or a combination of hardware and software, and consume much time.
Accordingly, it is an intention to provide a noise filtering method for image data, which can overcome the above drawbacks, and effectively and rapidly performs the noise filtering process for image data.